﻿#ifndef __GREATESTCOMMONDIVISOR__
#define __GREATESTCOMMONDIVISOR__
//欧几里得算法，求解最大公约数
int gcd(int a, int b){
	if(b == 0) return a;
	else return(b, a % b);
}

//非递归求解
int GCDnoncircle(int a, int b){
	for(;;){
		if(b == 0) return a;
		int temp = a;
		a = b;
		b = temp % b;
	}
}
#endif